<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Find Your Password</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="./defaultf.css" rel="stylesheet" type="text/css" media="all" />
    <link rel="stylesheet" type="text/css" href="./jquery/easyui.css">
    <link rel="stylesheet" type="text/css" href="./jquery/icon.css">
    <!-- CSS for Reset pwd -->
    <link href="./css/bootstrap.css" rel="stylesheet">
    <link href="./css/bootstrap.min.css" rel="stylesheet">
	<style>
    	.alert-danger {
    		background-image: -webkit-gradient(linear,left 0,left 100%,from(#f2dede),to(#e7c3c3));
    		background-image: -webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);
    		background-image: -moz-linear-gradient(top,#f2dede 0,#e7c3c3 100%);
    		background-image: linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);
    		background-repeat: repeat-x;
    		border-color: #dca7a7;
    		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede',endColorstr='#ffe7c3c3',GradientType=0);
		}
		.alert-danger {
    		color: rgb(185, 74, 72);
    		background-color: rgb(242, 222, 222);
    		border-color: rgb(235, 204, 209);
		}
    </style>
</head>
<body>
<div id="wrap">
	<div id="header-wrapper">
		<div id="header" class="container">
			<div id="logo">
				<img src="./images/eldercare.gif" alt="" title="" border="0" width="270" height="70"/>
			</div>
			</p>
			<br/>
			<br/>
		</div>
	</div>
</div>
    <div id="menu-wrapper">
        <div id="menu">
            <ul>
				<li class="current_page_item" ><a href="#" accesskey="1" title="">Find Your Password</a></li>    
            </ul>
        </div>
    </div>
    <div>
        <div id="wrap-content" style="margin: 0px auto; padding: 10px">
            <fieldset>
                <p></p>
                <p></p>
                <h4>Find Your Password</h4>
                <ul class="nav nav-tabs" id="myTab">
                    <li class="active"><a href="#username-tab" data-toggle="tab">Username</a></li>
                    <li><a href="#email-tab" data-toggle="tab">Email</a></li>
                </ul>

                <div class="tab-content">
                    <div class="tab-pane fade in active" id="username-tab">
                        <form action="./LoginController/ForgotPwdProcess.php" method="post" id="reset-username">
                            <table align="center">
                                <tr>
                                    <td>Please Enter Your Username:</td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="text" name="username" style="width:170px" maxlength="40" data-validation="required"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td align="middle">
										<button button class="btn" width="20">Submit</button>&nbsp;&nbsp;
                                        <input type="reset" onclick="redirect()" name="back" value="Back" button class="btn" style="width:70px"/>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                    <div class="tab-pane fade" id="email-tab">
                        <form action="LoginController/ForgotPwdProcess.php" method="post" id="reset-email">
                            <table align="center">
                                <tr>
                                    <td>Please Enter Your Email:</td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td><input type="text" name="email" style="width:170px" maxlength="50" data-validation="required email" /></td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr>
                                    <td align="middle">
										<button button class="btn" width="20">Submit</button>&nbsp;&nbsp;
										<input type="reset" onclick="redirect()" name="back" value="Back" button class="btn" style="width:70px"/>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                </div>

                <p style="vertical-align: middle; text-align: center">
                </p>
                <!-- <br><a href="./CMSUForgetpassword.php">Forget password</br> -->
            </fieldset>
			<?php
				if(!empty($_GET['msgno'])){
					$msgno=$_GET['msgno'];
					//Email sent success
					if($msgno==1){
						echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>A system email has sent to your Email address. </font></p>";
					}
					//Email sent failed
					else if($msgno==2){
						echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>Username does not exist.</font></p>";
					}
					else if($msgno==3){
						echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>Email does not exist.</font></p>";
					}
					else if($msgno==4){
						echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>SMTP Server Time out Error. Please check your network.</font></p>";
					}
					else if($msgno==5){
						echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>Reset password failed due to database error. Please contact with IT Support Team.</font></p>";
					}
                    else if($msgno==6){
                        echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>Invalid Username.</font></p>";
                    }
                    else if($msgno==7){
                        echo "<p style='text-align:center'><font text-align='center' color='red' size='3'>Invalid Email Format.</font></p>";
                    }
				}
			?>
            <!--</form>-->
        </div>
    </div>
</body>
	<!-- js for Reset pwd -->
 <!-- js for Reset pwd -->
<script src="https://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>

<script src="./jquery/jquery.min.js"></script>
<script type="text/javascript" src="./jquery/jquery-1.6.min.js"></script>
<script type="text/javascript" src="./jquery/jquery-1.4.4.min.js"></script>
<!-- validation -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="./js/jquery.form-validator.min.js" type="text/javascript"></script>
<script>
	$.validate({
	    form: '#reset-username,#reset-email',
	    validateOnBlur: false, // disable validation when input looses focus
	    errorMessagePosition: 'top', // Instead of 'element' which is default
	    scrollToTopOnError: false, // Set this property to true if you have a long form
	});

    function redirect(){
		var url = "./Index.php";
		location.href=url;
    }

	$(function () {
		$('#myTab a:first').tab('show')
	})
</script>
</html>


